package com.nbsaas.boot.product.data.entity;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.Comment;

@CreateByUser
@ComposeView
@Data
@FormAnnotation(title = "主题配置", model = "主题配置")
@Entity
@Table(name = "bs_theme_config")
@Comment("主题配置表")
public class ThemeConfig extends AbstractEntity {

    @Comment("主题名称")
    @SearchItem(name = "name", key = "name", label = "主题名称")
    @FormField(title = "主题名称", sortNum = "1", grid = true, required = true)
    @Column(length = 100, nullable = false)
    private String name;

    @Comment("主题编码")
    @SearchItem(name = "code", key = "code", label = "主题编码")
    @FormField(title = "主题编码", sortNum = "2", grid = true, required = true)
    @Column(length = 50, unique = true, nullable = false)
    private String code;

    @Comment("主题描述")
    @FormField(title = "主题描述", sortNum = "3")
    @Column(length = 500)
    private String description;

    @Comment("主题缩略图")
    @FormField(title = "主题缩略图", sortNum = "4", type = InputType.image)
    @Column(length = 500)
    private String thumbnail;

    @Comment("主题状态")
    @FormField(title = "主题状态", sortNum = "5", grid = true, type = InputType.select)
    @Column(length = 20)
    private String status; // ACTIVE-启用, INACTIVE-禁用, DRAFT-草稿

    @Comment("是否默认主题")
    @FormField(title = "是否默认主题", sortNum = "6", grid = true, type = InputType.select)
    private Boolean isDefault;

    @Comment("主色调")
    @FormField(title = "主色调", sortNum = "7", type = InputType.text)
    @Column(length = 20)
    private String primaryColor;

    @Comment("辅助色")
    @FormField(title = "辅助色", sortNum = "8", type = InputType.text)
    @Column(length = 20)
    private String secondaryColor;

    @Comment("背景色")
    @FormField(title = "背景色", sortNum = "9", type = InputType.text)
    @Column(length = 20)
    private String backgroundColor;

    @Comment("文字颜色")
    @FormField(title = "文字颜色", sortNum = "10", type = InputType.text)
    @Column(length = 20)
    private String textColor;

    @Comment("链接颜色")
    @FormField(title = "链接颜色", sortNum = "11", type = InputType.text)
    @Column(length = 20)
    private String linkColor;

    @Comment("边框颜色")
    @FormField(title = "边框颜色", sortNum = "12", type = InputType.text)
    @Column(length = 20)
    private String borderColor;

    @Comment("字体族")
    @FormField(title = "字体族", sortNum = "13")
    @Column(length = 100)
    private String fontFamily;

    @Comment("字体大小")
    @FormField(title = "字体大小", sortNum = "14")
    @Column(length = 20)
    private String fontSize;

    @Comment("字体粗细")
    @FormField(title = "字体粗细", sortNum = "15")
    @Column(length = 20)
    private String fontWeight;

    @Comment("圆角大小")
    @FormField(title = "圆角大小", sortNum = "16")
    @Column(length = 20)
    private String borderRadius;

    @Comment("阴影样式")
    @FormField(title = "阴影样式", sortNum = "17")
    @Column(length = 100)
    private String boxShadow;

    @Comment("排序")
    @FormField(title = "排序", sortNum = "18", grid = true, type = InputType.el_input_number, sort = true)
    private Integer sort;

    @Comment("主题配置JSON")
    @FormField(title = "主题配置", sortNum = "19", type = InputType.richText, col = 23)
    @Column(columnDefinition = "TEXT")
    private String config;
} 